Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

require-main-filename

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

require-main-filename

shim for require.main.filename() that works in as many environments as possible

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
9M
decreased by-56.99%
Maintainers
1
Weekly downloads
 
Created

What is require-main-filename?

The require-main-filename package is a simple utility that helps you determine the main entry point filename of the currently running Node.js application. This can be particularly useful when you are writing a module that needs to know the entry point of the application it is being used in.

What are require-main-filename's main functionalities?

Get main entry point filename

This feature allows you to retrieve the filename of the main module that started the current application. The code sample demonstrates how to use the package to log the main filename to the console.

const requireMainFilename = require('require-main-filename');
console.log(requireMainFilename());

Other packages similar to require-main-filename

Keywords

FAQs

Package last updated on 28 Jan 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc